package cn.cq.admin.controller;

import cn.cq.admin.entity.model.ScoreUtil;
import cn.cq.admin.entity.model.UserCourseCourseware;
import cn.cq.admin.service.UserCourseCoursewareService;
import cn.dev33.satoken.util.SaResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Collection;

@RestController
@RequestMapping("/ucc")
public class UserCourseCoursewareController {
    @Resource
    private UserCourseCoursewareService uccService;
    @PutMapping("/doModify")
    public SaResult doModify(@RequestBody UserCourseCourseware ucc) {
        uccService.doModify(ucc);
        return SaResult.ok("保存成功");
    }
    @GetMapping("/getScore")
    public SaResult getScore() {
        Collection<ScoreUtil> list = uccService.getScore();
        return SaResult.data(list);
    }

}
